/*
 *  Copyright 2005 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.persistence.questionnaire;

import com.blandware.atleap.persistence.core.DAO;
import com.blandware.atleap.model.questionnaire.FilledQuestionnaire;
import com.blandware.atleap.model.questionnaire.Questionnaire;
import com.blandware.atleap.common.util.QueryInfo;
import com.blandware.atleap.common.util.PartialCollection;

/**
 * <p>DAO for filled questionnaires.</p>
 * <p><a href="FilledQuestionnaireDAO.java.html"><i>View source</i></a></p>
 *
 * @author Roman Puchkovskiy <a href="mailto:roman.puchkovskiy@blandware.com">
 *         &lt;roman.puchkovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.2 $ $Date: 2006/06/16 15:21:27 $
 */
public interface FilledQuestionnaireDAO extends DAO {

    // ~ CRUD methods ================================================================

    /**
     * Creates a filled questionnaire.
     *
     * @param filledQuestionnaire filled questionnaire to create
     * @param questionnaire questionnaire to which it belongs
     * @return ID of created entity
     */
    public Long createFilledQuestionnaire(FilledQuestionnaire filledQuestionnaire,
                                          Questionnaire questionnaire);

    /**
     * Retrieves a filled questionnaire by its ID.
     *
     * @param filledQuestionnaireId ID of filled questionnaire to retrieve
     * @return retrieved filled questionnaire
     */
    public FilledQuestionnaire retrieveFilledQuestionnaire(Long filledQuestionnaireId);

    /**
     * Deletes a filled questionnaire.
     *
     * @param filledQuestionnaire filled questionnaire to delete
     */
    public void deleteFilledQuestionnaire(FilledQuestionnaire filledQuestionnaire);

    // ~ Additional methods ================================================================

    /**
     * Retrieves filtered/sorted collection of filled questionnaires.
     *
     * @param queryInfo Object that contains information about how to filter
     * and sort data
     * @return Collection of filled questionnaires
     */
    public PartialCollection listFilledQuestionnaires(QueryInfo queryInfo);
    
}
